package com.lh.runmanage.dao;

import com.lh.runmanage.dto.ProjAvgDto;
import com.lh.runmanage.model.InPutParam.*;
import com.lh.runmanage.model.ProjAvgBaseModel;
import com.lh.runmanage.model.ProjAvgD8Model;
import com.lh.runmanage.model.ProjAvgReportModel;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-14 18:12
 * @function
 * @editLog
 */
@Mapper
public interface ProjAvgMapper {
    /**
     * 得到项目加权平均值
     *
     * @param projAvgInParam com.lh.runmanage.model.InPutParam.ProjAvgInParam
     * @return 项目加权平均值
     */
    BigDecimal selectProAvgByProCode(ProjAvgInParam projAvgInParam);
    /**
     * 展示端方法：D8，得到大屏曲线
     *
     * @param projAvgD8InParam com.lh.runmanage.model.InPutParam.ProjAvgD8InParam
     * @return 得到前20个项目的加权平均值，统计方式：月
     */
    List<ProjAvgD8Model> selectProjAvgD8(ProjAvgD8InParam projAvgD8InParam);

    /**
     * 按月、季度、半年、年统计菜单加权平均值
     *
     * @param projAvgReportInParam com.lh.runmanage.model.InPutParam.ProjAvgReportInParam
     * @return 影响条数
     */
    List<ProjAvgReportModel> selectProjAvgByProjectAndTimeGroupBy(ProjAvgReportInParam projAvgReportInParam);

    /**
     * 得到项目加权平均值
     *
     * @param projAvgAllInParam com.lh.runmanage.model.InPutParam.ProjAvgAllInParam
     * @return 根据项目ID
     */
    ProjAvgDto selectProjAvgByProjCode(ProjAvgAllInParam projAvgAllInParam);

    /**
     * 得到项目加权平均值
     *
     * @param projAvgBaseInParam com.lh.runmanage.model.InPutParam.ProjAvgBaseInParam
     * @return 根据项目ID、月数、统计类型
     */
    ProjAvgBaseModel selectProjAvgByProjCodeWithOutType(ProjAvgBaseInParam projAvgBaseInParam);

}